#ifndef __PGPLOT_RENDERER_H
#define __PGPLOT_RENDERER_H

#include <iostream>
#include <string>

#include "Renderer.h"
#include "DataContainer.h"

#define DEFAULT_DEV "/xs"

using namespace std;

class PGPLOT_Renderer : public Renderer{

	private:
	void draw_pixel(float x1, float x2, float y1, float y2, float value);
	public: 

	// the functions
        // Unfortunately these have to replicate the functionality of the PGPLOT library
	
	void set_device(char *); // set the pgplot device
	void set_window(float x1, float x2, float y1, float y2);
	void set_labels(string title,string xlabel,string ylabel);
 
	int draw_frame();
	int init();
	int draw_pixels(DataContainer *);
        void set_numlevels(int numlevs);
	 
	PGPLOT_Renderer();
	~PGPLOT_Renderer();
			
	private:
	// the window 
	float xmin;
	float xmax;
	float ymin;
	float ymax;
	
	char *device;

	// the axes
	string title;
	string xlabel;
	string ylabel;

	string x_options;
	string y_options;

	// the number of colour(bw) levels

	int num_levels;
	void set_gray_levels();


};	
#endif
